package demo5;

public class JavaBeanStudent {
    //写一个Javabean描述一个班级的学生
    //属性：姓名、年龄、性别。 行为：学习
    //练习static静态，不可以被调用
    //新增老师
    private String name;
    private int age;
    private char gender;
    public static String teacher;
    public JavaBeanStudent() {
    }

    public JavaBeanStudent(String name, int age, char gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }
    public void eat(){
        System.out.println(name+"上课吃零食");
    }
    public void show(){
        System.out.println(name+" "+age+" "+gender+" "+teacher);
    }
}
